package com.example.exam.service.impl;

import com.example.exam.dao.ManagerInfoDao;
import com.example.exam.entity.ExamineeInfo;
import com.example.exam.entity.ManagerInfo;
import com.example.exam.req.admin.AdminAddexam;
import com.example.exam.req.admin.AdminLoginReq;
import com.example.exam.req.admin.UpdateExamineeInfo;
import com.example.exam.service.ManagerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ManagerInfoServiceImpl implements ManagerInfoService {

    @Resource
    private ManagerInfoDao managerInfoDao;

    @Override
    public ManagerInfo login(AdminLoginReq adminLoginReq) {
        ManagerInfo managerInfo = managerInfoDao.login(adminLoginReq);
        return managerInfo;
    }

    @Override
    public List<ExamineeInfo> findAllExaminee() {
        return managerInfoDao.findAllExaminee();
    }

    @Override
    public boolean deleteByIDCard(String IDCard) {
        return managerInfoDao.deleteByIDCard(IDCard);
    }

    @Override
    public boolean updateExamineeInfo(UpdateExamineeInfo updateExamineeInfo) {
        return managerInfoDao.updateExamineeInfo(updateExamineeInfo);
    }

    @Override
    public boolean adminAddexam(AdminAddexam adminAddexam) {
        return managerInfoDao.adminAddexam(adminAddexam);
    }
}
